package com.hulu.yec.sys.course.entity;

import java.util.Date;

/**
 * 课程的实体
 * 
 * @author Administrator
 *
 */
public class CourseEntity {
	private Integer id;
	// 父节点
	private String pId;
	// 是否有子节点：1、有；2、无
	private Integer isLeaf;
	private String name;
	private String operateUserId;
	private Date operateTime;
	private Integer state;
	private String memo;

	public CourseEntity() {
		super();
	}

	public CourseEntity(Integer id, String pId, Integer isLeaf, String name, String operateUserId, Date operateTime,
			Integer state, String memo) {
		super();
		this.id = id;
		this.pId = pId;
		this.isLeaf = isLeaf;
		this.name = name;
		this.operateUserId = operateUserId;
		this.operateTime = operateTime;
		this.state = state;
		this.memo = memo;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getPId() {
		return pId;
	}

	public void setPId(String pId) {
		this.pId = pId;
	}

	public Integer getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(Integer isLeaf) {
		this.isLeaf = isLeaf;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getOperateUserId() {
		return operateUserId;
	}

	public void setOperateUserId(String operateUserId) {
		this.operateUserId = operateUserId;
	}

	public Date getOperateTime() {
		return operateTime;
	}

	public void setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
	}

	public Integer getState() {
		return state;
	}

	public String getStateStr() {
		if (state == 1) {
			return "有效";
		} else if (state == 2) {
			return "无效";
		} else {
			return "错误";
		}
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

}
